<div class="headbar">
	<div class="position">订单<span>></span><span>单据管理</span><span>></span><span>收款单回收站</span></div>
	<div class="operating">
		<a href="javascript:;"><button class="operating_btn" type="button" onclick="window.location='{url:/order/order_collection_list}'"><span class="import">返回列表</span></button></a>
		<a href="javascript:void(0)" onclick="selectAll('id[]')"><button class="operating_btn" type="button"><span class="sel_all">全选</span></button></a>
		<a href="javascript:void(0)" onclick="recycle_del()"><button class="operating_btn" type="button"><span class="delete">彻底删除</span></button></a>
		<a href="javascript:void(0)" onclick="recycle_restore()"><button class="operating_btn"><span class="recover">还原</span></button></a>
	</div>
	<div class="field">
		<table class="list_table">
			<col width="30px" />
			<col width="30px" />
			<col width="170px" />
			<col />
			<thead>
				<tr>
					<th class="t_c">选择</th>
					<th></th>
					<th>订单号</th>
					<th>收货金额</th>
					<th>付款人</th>
					<th>支付方式</th>
					<th>支付状态</th>
					<th>完成时间</th>
				</tr>
			</thead>
		</table>
	</div>
</div>
<form name="orderForm" action="" method="post">
<div class="content">
	<table class="list_table">
		<col width="30px" />
		<col width="30px" />
		<col width="170px" />
		<col />
		<tbody>
			{set:$page= (isset($_GET['page'])&&(intval($_GET['page'])>0))?intval($_GET['page']):1;}
			{query: name=collection_doc as c join=left join order as o on c.order_id eq o.id left join member as m on m.user_id eq c.user_id left join payment as p on c.payment_id eq p.id fields=o.order_no,c.amount,m.true_name,p.name,c.id,o.id as oid,c.pay_status,c.time where=c.if_del eq 1 order= o.id desc page=$page }
			<tr>
				<td class="t_c"><input name="id[]" type="checkbox" value="{$item['id']}" /></td>
				<td><a href="{url:/order/collection_show/id/$item[id]}"><img class="operator" src="{skin:images/admin/icon_check.gif}" title="查看" /></a></td>
				<td>{$item['order_no']}</td>
				<td>{$item['amount']}</td>
				<td>{$item['true_name']}</td>
				<td>{$item['name']}</td>
				<td>{if:$item['pay_status']==1}支付完成{else:}准备中{/if}</td>
				<td>{$item['time']}</td>
			</tr>
			{/query}
		</tbody>
	</table>
</div>
{$query->getPageBar()}
</form>

<script type="text/javascript">
//恢复数据
function recycle_restore()
{
	$("form[name='orderForm']").attr('action','{url:/order/collection_recycle_restore}');
	confirm('确定要还原所选中的信息吗？','formSubmit(\'orderForm\')');
}

//删除数据
function recycle_del()
{
	$("form[name='orderForm']").attr('action','{url:/order/collection_recycle_del}');
	confirm('确定要彻底删除所选中的信息吗？','formSubmit(\'orderForm\')');
}
</script>